package com.jp.knowledge.my.adapter;

import android.content.Context;
import android.support.annotation.NonNull;

import com.jp.knowledge.R;
import com.jp.knowledge.my.base.RecycleVAdapter;
import com.jp.knowledge.my.base.RecycleVHolder;
import com.jp.knowledge.my.model.HelpModel;

import java.util.List;

/**
 * Created by 528787067@qq.com on 2017/6/21.
 */

public class HelpAdapter extends RecycleVAdapter<HelpModel> {

	public HelpAdapter(Context context, @NonNull List<HelpModel> list) {
		super(context, list);
	}

	@Override
	public int getLayoutId(int viewType) {
		return R.layout.item_help;
	}

	@Override
	public void onBind(RecycleVHolder holder, int position) {
		holder.setImageUrl(R.id.help_icon, getData(position).getCateIcon());
		holder.setTextView(R.id.help_text, getData(position).getCateTitle());
	}
}
